import { createApp } from 'vue'

import '@/assets/css/base.css'

import router from '@/router'
//保证App 在 router 之后
import App from './App.vue'
const app = createApp(App);

// 引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// 引入element-plus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 使用router
app.use(router)

//使用中文ElementPlus
app.use(ElementPlus, { locale: zhCn })
app.mount('#app')

// 注册element-plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}